/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package specifications;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Locale;

/**
 *
 * @author Jason
 */
public class Picklists implements Serializable{
    private ArrayList<String> languageCodes;
    private ArrayList<String> regionCodes;
    private ArrayList<String> languageNames;
    private ArrayList<String> regionNames;
    private ArrayList<String> statuses;

    
    public Picklists(){
        statuses = new ArrayList<String>(4);
        statuses.add("incomplete");
        statuses.add("not specified");
        statuses.add("proposed");
        statuses.add("approved");
        
        languageCodes = new ArrayList<String>();
        languageCodes.addAll(Arrays.asList(Locale.getISOLanguages()));
        regionCodes = new ArrayList<String>();
        regionCodes.addAll(Arrays.asList(Locale.getISOCountries()));
        
        languageNames = new ArrayList<String>();
        for (String code : languageCodes){
            Locale loc = new Locale(code);
            languageNames.add(loc.getDisplayLanguage());
        }
        
        regionNames = new ArrayList<String>();
        for (String code : regionCodes){
            Locale loc = new Locale("en", code);
            regionNames.add(loc.getDisplayCountry());
        }
        languageCodes.add(0, "");
        languageNames.add(0, "---------------------------------");
        regionCodes.add(0, "");
        regionNames.add(0, "---------------------------------");
//        System.out.println(languageCodes);
//        System.out.println(regionCodes);
//        System.out.println(languageNames);
//        System.out.println(regionNames);
    }


    /**
     * @return the languageNames
     */
    public ArrayList<String> getLanguageNames() {
        return languageNames;
    }

    /**
     * @param languageNames the languageNames to set
     */
    public void setLanguageNames(ArrayList<String> languageNames) {
        this.languageNames = languageNames;
    }

    /**
     * @return the regionNames
     */
    public ArrayList<String> getRegionNames() {
        return regionNames;
    }

    /**
     * @param regionNames the regionNames to set
     */
    public void setRegionNames(ArrayList<String> regionNames) {
        this.regionNames = regionNames;
    }

    /**
     * @return the languageCodes
     */
    public ArrayList<String> getLanguageCodes() {
        return languageCodes;
    }

    /**
     * @param languageCodes the languageCodes to set
     */
    public void setLanguageCodes(ArrayList<String> languageCodes) {
        this.languageCodes = languageCodes;
    }

    /**
     * @return the regionCodes
     */
    public ArrayList<String> getRegionCodes() {
        return regionCodes;
    }

    /**
     * @param regionCodes the regionCodes to set
     */
    public void setRegionCodes(ArrayList<String> regionCodes) {
        this.regionCodes = regionCodes;
    }

    /**
     * @return the statuses
     */
    public ArrayList<String> getStatuses() {
        return statuses;
    }

    /**
     * @param statuses the statuses to set
     */
    public void setStatuses(ArrayList<String> statuses) {
        this.statuses = statuses;
    }


    
}
